﻿@model EnetaMvc.ApplicationServices.Dto.EventDto

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_EventLayout.cshtml";
}
@section Header 
{
    <link href="@Url.Content("~/Content/jquery.cleditor.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(document).ready(function ()
        {
            $("#Body").cleditor();
        });
    </script>
}

<style>
    .profile .information-main
    {
        float: left;
        width: 320px;
        margin-left: 30px;
    }
</style>

<div id="content" class="calendar">
    <span class="content-top">&nbsp;</span>
	<div class="content-main">
        <div class="content-info-area">
            @if(Model.Id > 0)
            {
                <h3>@Resources.EnetaMvc.EditEvent</h3>
            }
            else
            {
                <h3>@Resources.EnetaMvc.CreateEvent</h3>
            }

            @Html.ValidationSummary()
            @Html.ShowSuccessMessage((string)ViewBag.SuccessMessage)

            <div class="enter-information">
                @{ Html.BeginForm(); }
                    @if(Model != null)
                    {
                        @Html.HiddenFor(m => m.Id)
                    }
                    else 
                    {
                        @Html.Hidden("Id", 0);
                    }

                    <fieldset>
                        <div class="input-holder profile">
                            <div class="info-row">
						        @Html.ValidationMessageFor(m => m.Title)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventTitle</h5>
						        </div>
						        <div class="error-note"> <span>*</span> </div>
						        <div class="information-main">
                                    @Html.TextBoxFor(m => m.Title, new Dictionary<string,object> { {"class","text-go"} })
                                </div>
					        </div>
                            <div class="info-row">
						        @Html.ValidationMessageFor(m => m.Abstract)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.Abstract</h5>
						        </div>
						        <div class="error-note"> <span>*</span> </div>
						        <div class="information-main">
                                    @Html.TextAreaFor(m => m.Abstract, new {cols = 40, rows = 2})
                                </div>
					        </div>
                            <div class="info-row">
						        @Html.ValidationMessageFor(m => m.Body)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.Body</h5>
						        </div>
						        <div class="error-note"> <span>*</span> </div>
						        <div class="information-main">
                                    @Html.TextAreaFor(m => m.Body, new {cols = 40, rows = 15, id = "Body"})
                                </div>
					        </div>
                            <div class="info-row">
						        @Html.ValidationMessageFor(m => m.StartDate)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventStartDate</h5>
						        </div>
						        <div class="error-note"> <span>*</span> </div>
						        <div class="information-main"> 
                                    @Html.TextBoxFor(m => m.StartDate, new Dictionary<string,object> { {"class","text-go datepicker"} })
                                </div>
					        </div>
                            <div class="info-row">
						        @Html.ValidationMessageFor(m => m.EndDate)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventEndDate</h5>
						        </div>
						        <div class="error-note"> <span>*</span> </div>
						        <div class="information-main">
                                    @Html.TextBoxFor(m => m.EndDate, new Dictionary<string,object> { {"class","text-go datepicker"} })
                                </div>
					        </div>
                            <div class="info-row">
						        @Html.ValidationMessageFor(m => m.RegistrationEndDate)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventRegistrationEndDate</h5>
						        </div>
						        <div class="error-note"> <span>*</span> </div>
						        <div class="information-main">
                                    @Html.TextBoxFor(m => m.RegistrationEndDate, new Dictionary<string,object> { {"class","text-go datepicker"} })
                                </div>
					        </div>
                            <div class="info-row">
						        @Html.ValidationMessageFor(m => m.VenueName)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventVenueName</h5>
						        </div>
						        <div class="error-note"></div>
						        <div class="information-main">
                                    @Html.TextBoxFor(m => m.VenueName, new Dictionary<string,object> { {"class","text-go"} })
                                </div>
					        </div>
                            <div class="info-row">
						        @Html.ValidationMessageFor(m => m.VenueMapUrl)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventVenueMapUrl</h5>
						        </div>
						        <div class="error-note"></div>
						        <div class="information-main">
                                    @Html.TextBoxFor(m => m.VenueMapUrl, new Dictionary<string,object> { {"class","text-go"} })
                                </div>
					        </div>
                            <div class="info-row">
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventHasRealEvent</h5>
						        </div>
						        <div class="error-note"></div>
						        <div class="information-main">
                            
                                    @Html.CheckBoxFor(m => m.HasRealEvent, new Dictionary<string, object> { { "class", "choice" } })
                                </div>
					        </div>
                            <div class="info-row">
                                @Html.ValidationMessageFor(m => m.Seats)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventRealEventSeats</h5>
						        </div>
                                <div class="error-note"></div>
						        <div class="information-main">
                            
                                    @Html.TextBoxFor(m => m.Seats, new Dictionary<string,object> { {"class","text-go"} })
                                </div>
					        </div>
                            <div class="info-row">
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventHasVirtualEvent</h5>
						        </div>
						        <div class="error-note"></div>
						        <div class="information-main">
                                    @Html.CheckBoxFor(m => m.HasVirtualEvent, new Dictionary<string, object> { { "class", "choice" } })
                                </div>
					        </div>
                            <div class="info-row">
                                @Html.ValidationMessageFor(m => m.PercentOfDemos)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventPercentOfDemos</h5>
						        </div>
                                <div class="error-note"> </div>
						        <div class="information-main">
                            
                                    @Html.TextBoxFor(m => m.PercentOfDemos, new Dictionary<string,object> { {"class","text-go"} })
                                </div>
					        </div>
                            <div class="info-row">
                                @Html.ValidationMessageFor(m => m.PercentOfSlides)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.EventPercentOfSlides</h5>
						        </div>
                                <div class="error-note"></div>
						        <div class="information-main">
                            
                                    @Html.TextBoxFor(m => m.PercentOfSlides, new Dictionary<string,object> { {"class","text-go"} })
                                </div>
					        </div>
                            <div class="info-row">
                                @Html.ValidationMessageFor(m => m.Tags)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.Tags</h5>
						        </div>
                                <div class="error-note"></div>
						        <div class="information-main">
                                    @Html.CheckBoxList("audienceIds", Html.GetMyRolesWithSelection(Model.TargetAudiences))
                                </div>
					        </div>
                            @if(Model.Id > 0)
                            {
                            <div class="info-row">
						        <div class="title">
							        <h5>@Resources.EnetaMvc.Created</h5>
						        </div>
						        <div class="information-main">
                                    @if(Model != null)
                                    {
                                        <span>@Model.Created</span>
                                    }
                                </div>
					        </div>
                            <div class="info-row">
						        <div class="title">
							        <h5>@Resources.EnetaMvc.CreatedBy</h5>
						        </div>
						        <div class="information-main">
                                    @if(Model != null)
                                    {
                                        <span>@Model.CreatedByUserName</span>
                                    }
                                </div>
					        </div>
                            <div class="info-row">
						        <div class="title">
							        <h5>@Resources.EnetaMvc.PublishStateBy</h5>
						        </div>
						        <div class="information-main">
                                    @if(Model != null)
                                    {
                                        <span>@Model.PublishStateByUserName</span>
                                    }
                                </div>
					        </div>
                            }
                            <div class="info-row">
						        <div class="title">
							        <h5>@Resources.EnetaMvc.PublishState</h5>
						        </div>
						        <div class="information-main">
                                    @if(Model != null)
                                    {
                                        @Html.DropDownListFor(m => m.PublishStateId, Html.GetPublishStatesWithSelection(Model.PublishStateId))
                                    }
                                    else 
                                    {
                                        @Html.DropDownListFor(m => m.PublishStateId, Html.GetPublishStatesWithSelection(0))
                                    }
                                </div>
					        </div>
                            <div class="info-row">
                                @Html.ValidationMessageFor(m => m.PublishComment)
						        <div class="title">
							        <h5>@Resources.EnetaMvc.PublishComment</h5>
						        </div>
                                <div class="error-note"> <span>*</span> </div>
						        <div class="information-main">
                            
                                    @Html.TextBoxFor(m => m.PublishComment, new Dictionary<string,object> { {"class","text-go"} })
                                </div>
					        </div>
                        </div>
                        <div class="submit">
					        <input type="submit" value="@Resources.EnetaMvc.Save"/>
				        </div>
				        <a class="loobu" href="@Url.Content("~/events/")">@Resources.EnetaMvc.Cancel</a>
                        <p style="display:block;clear: both">&nbsp;</p>
                    </fieldset>
                @{ Html.EndForm(); }
            </div>
        </div>
    </div>
    <span class="content-bottom">&nbsp;</span>
</div>